home *** CD-ROM | disk | FTP | other *** search
- Path: god.bel.alcatel.be!btmpj7!ian
- From: ian@rsd.bel.alcatel.be (Ian Ward)
- Newsgroups: comp.lang.c
- Subject: Re: Tough FACTORIAL math problem...
- Date: 16 Feb 1996 17:57:53 GMT
- Organization: Alcatel Bell Telephone
- Distribution: world
- Message-ID: <4g2gj1$qpr@btmpjg.god.bel.alcatel.be>
- References: <4g2anb$gre@btmpjg.god.bel.alcatel.be>
- Reply-To: ian@rsd.bel.alcatel.be
- NNTP-Posting-Host: btmpj7.rsd.bel.alcatel.be
-
-
- Last one: best I can do, unless someone can show me that
- it doesn't work:
-
-
- int last_digit2 (num)
- int num;
- {static int fred [] =
- {2,6,4,2,2,4,2,8,8,8,6,8,2,6,6,2,6,4,4,4,
- 8,4,6,8,8,6,8,2,2,2,4,2,8,4,4,8,4,6,6,6};
- return num>1?fred[(num-2)%40]:1;}
-
-
- Have a good weekend, my build has just finished,
- I'm going home.
-
-
- ---
- Ian Ward's opinions only : ian@rsd.bel.alcatel.be
- (For "home" read "drinking")
-